const spawn = require('child_process').spawn

let projectName = process.argv[process.argv.length - 1]
process.argv.splice(3, 1)

let opts = ['serve', '--mode', projectName]
const runner = spawn('yarn.cmd', opts, {stdio: 'inherit'})

runner.on('exit', function (err) {
    console.log(err)
})

runner.on('error', function(err) {
    console.log(err)
})

